package com.mdd.common.entity.yangyangLeadingEnterprise.dto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.mdd.common.entity.yangyangLeadingEnterprise.TAppUser;
import com.mdd.common.entity.yangyangLeadingEnterprise.TAppUserData;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.io.Serializable;

@ApiModel
@Data
public class AppUserDTO implements Serializable {

    @ApiModelProperty(value = "")
    private Long id;

    @ApiModelProperty("昵称")
    private String nickname;

    @ApiModelProperty("账号")
    private String username;

    @ApiModelProperty("头像地址")
    private String personalPic;

    @ApiModelProperty(value = "手机号")
    private String phone;

    @ApiModelProperty(value = "个人介绍")
    private String personalIntroduction;

    @ApiModelProperty(value = "背景图")
    private String backgroundPic;

    @ApiModelProperty("用户补充数据id")
    private Integer userDataId;

    @ApiModelProperty("用户绑定的企业信息")
    private AppEnterpriseDTO enterpriseDTO;

    private TAppUserData appUserData;

    public static AppUserDTO toAppUserDTO(TAppUser appUser) {
        AppUserDTO appUserDTO = new AppUserDTO();
        BeanUtils.copyProperties(appUser, appUserDTO);
        return appUserDTO;
    }
}
